package demo.annotation.clazz;

import demo.annotation.AreaInfo;

import java.lang.annotation.Annotation;

public class Test {

	// 获取Class上的注解信息
	public static void main(String[] args) throws ClassNotFoundException {
		Class clazz = Class.forName("demo.annotation.Singer");
		Annotation[] annotations = clazz.getAnnotations();
		for(Annotation annotation: annotations){
			AreaInfo areaInfo = (AreaInfo) annotation;
			System.out.println("country："+areaInfo.country());
		}
	}
}
